package com.lhyl.front.handler;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lhyl.front.report.RepDataHandlerService;
import com.lhyl.front.service.ReportService;


@Service("profitanlossHandler")
public class ProfitanlossProcessHanlder implements RepDataHandlerService{

	@Autowired
	private ReportService reportService;
	
	@Override
	public Object handlerRepData(List<Map<String, Object>> srcData, Map<String, Object> query) throws Exception
	{
		if(srcData!=null&&!srcData.isEmpty())
		{
			Map<String,Object>resultMap=this.reportService.querySingleResult("statisticsProfitanloss", query);
			srcData.add(resultMap);//产生一条汇总记录
			return srcData;
		}
		return null;
	}

}
